import type { App } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
export const routes: RouteRecordRaw[] = [
    {
        path: '/',
        name: 'Home',
        children: [
            {
                path: '/',
                name: 'HomeIndex',
                component: () => import('../views/home/index.vue'),
                meta: {
                    hideInMenu: true,
                }
            }
        ],
        meta: {
            hideInMenu: true,
        }
    },
    {
        path: '/:pathMatch(.*)*',
        name: 'NotFound',
        component: () => import('../views/page/404.vue'),
        meta: {
            hideInMenu: true,
        }
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes,
    scrollBehavior: () => ({ left: 0, top: 0 })
});

export function setupRouter(app: App<Element>) {
    app.use(router);
};

export default router; 